home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / security / doc / clippings / 911219-01 < prev    next >
Encoding:
Internet Message Format  |  1992-01-09  |  4.0 KB

  1. From: brossard@sic.epfl.ch (Alain Brossard EPFL-SIC/SII)
  2. Newsgroups: alt.sys.sun,alt.security
  3. Subject: ypserv, unsecure
  4. Message-ID: <2196@sicsun.epfl.ch>
  5. Date: 19 Dec 91 12:02:21 GMT
  6.  
  7.  
  8.    In a prior message on alt.security, there was mention of a
  9. vulnerability of ypserv.  Since enough people now know about this
  10. security hole, I guess it is time to post a solution!
  11.  
  12.    I won't go into the details of exactly what this hole his,
  13. but it is fairly trivial to get any NIS maps as long as you can
  14. be root on the internet.  Since this NIS map can be the password
  15. file...
  16.  
  17.    One way to improve the situation is to use a random NIS domain
  18. name for your domain, this will make it that much harder to
  19. get your maps, another solution is to cut all RPC packets
  20. >From coming in your domain.
  21.  
  22. In article <prl.691873839@iis>, prl@iis.ethz.ch (Peter Lamb) writes:
  23. |> 2) The Lamb Party Line. If you communicate to the outside world through a
  24. |>    smart router, filter out packets coming from external connections
  25. |>    addressed to destination ports sunrpc/udp&tcp (port 111) and ports
  26. |>    600-1023, tcp&udp. This will prevent access to *all* sunrpc services
  27. |>    from outside the router. It will also block access to the Kerberos
  28. |>    protocols (probably also not a bad idea given the info. in Steve
  29. |>    Bellovin's paper about Kerberos security problems), and will
  30. |>    probably block the BSD `r' (rcp,rlogin, etc) commands, but don't
  31. |>    count on it doing so.  If you and your router are smart enough, you
  32. |>    may be able to make the `r' commands work.  Eg, for rlogin, allow
  33. |>    the packets through iff their source is 513/tcp (this opens up a hole
  34. |>    for a sufficiently clever cracker, though). Blocking port 111 alone
  35. |>    is insufficient but will block the most obvious attacks (including
  36. |>    those I've been told have already actually occurred).
  37. |> 
  38.  
  39.    A better solution which solves the problem with ypserv and
  40. ypxfrd has been developed in cooperation with quite a few people.
  41. It also solves the following two problems:
  42.  
  43.     1- There was still the problem that a DNS in bad hands
  44.        could spoof anybody (Sun's fix to BSD bind for this
  45.        still had one hole, BSD's bind is highly vulnerable)
  46.        (The fix for this came from Tho Deraadt)
  47.     2- The annoying erroneous warning nres_gethostbyaddr: ... != ...
  48.        has been fixed (this was suggested by Vince Giambalvo) and
  49.        Tho Deraadt provided the impetus.
  50.  
  51.    Once again due to copyright restrictions, sources are not
  52. available.  However for those who want the source patches, send
  53. me the last 3 lines of ypserv.c and I'll e-mail them ...
  54. as long as it's in before Thursday night local time :-).
  55.    For those who want to rebuild their libc.so, I have included
  56. gethostnamadr.o which has been fixed (see 3- above).  For my
  57. local managers, I also included the full libc.so which is why
  58. the main patch is big (800KBytes+).  My libc.so included uses
  59. the DNS directly which is why it needed to be patched.  If you
  60. use DNS via the ypserver, it has been patched already, no need
  61. for the libc.so.
  62.  
  63.    The patch is available, for now, on litsun.epfl.ch in the directory
  64. pub.  Since the cost of transfering my local patch with the libc's
  65. might be too high across continents, I also made a second file
  66. without the libc's.  I've been told that I shouldn't use litsun
  67. in the future, so the patches won't stay there too long...
  68.  
  69. -rw-r--r--  1 brossard   819190 Dec 17 14:15 nis.patch-01.tar.Z
  70. -rw-r--r--  1 root       117771 Dec 17 15:05 nis.patch.no.libc-01.tar.Z
  71. litsun# sum *.Z
  72. 11058   800 nis.patch-01.tar.Z
  73. 36615   116 nis.patch.no.libc-01.tar.Z
  74.  
  75.     To use the new ypserv, read the included man page on ypserv
  76. and hosts.nis.
  77.  
  78.     Thanks to all who contributed, you know who you are.
  79.  
  80.                     Alain
  81.  
  82. PS: I've had request for patches for other vendors, since we don't
  83. have any sources  I can't provide them.  But we do have HP and SG's
  84. machines so I would be glad to be a central repository for binaries/
  85. patches for other vendors.
  86.     
  87. -- 
  88.  
  89. Alain Brossard, Ecole Polytechnique Federale de Lausanne,
  90.     SIC/SII, EL-Ecublens, CH-1015 Lausanne, Suisse, +41 21 693-2211
  91. brossard@sic.epfl.ch
  92.  
  93.